﻿#pragma once
#include "afxdialogex.h"
#include "CRectTrackerEx.h"


// CShowDialog 对话框

class CShowDialog : public CDialogEx
{
	DECLARE_DYNAMIC(CShowDialog)

public:
	CShowDialog(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~CShowDialog();

	// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_SHOW_DIALOG };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();
	CBitmap m_DesktopBitmap;//桌面截图
	CRect m_DesktopRect;//桌面大小
	afx_msg void OnPaint();
	CDC m_MemDC;//内存DC
	CRectTrackerEx m_rectTracker;//矩形选择框
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	void DoubleBufferPaint(CDC* pDC);//双缓冲绘图
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnDestroy();
};
